import { axios } from '@/utils/request'

/**
 * 查询房产
 *
 * @author anti
 * @date 2021-04-12 19:05:27
 */
export function busRealEstatePage (parameter) {
  return axios({
    url: '/busRealEstate/page',
    method: 'get',
    params: parameter
  })
}

/**
 * 房产列表
 *
 * @author anti
 * @date 2021-04-12 19:05:27
 */
export function busRealEstateList (parameter) {
  return axios({
    url: '/busRealEstate/list',
    method: 'get',
    params: parameter
  })
}

export function getStateList (parameter) {
  return axios({
    url: '/busRealEstate/getStateList',
    method: 'get',
    params: parameter
  })
}

export function getStateListForWater (parameter) {
  return axios({
    url: '/busRealEstate/getStateListForWater',
    method: 'get',
    params: parameter
  })
}

export function getStateRoomList (parameter) {
  return axios({
    url: '/busRealEstate/getStateRoomList',
    method: 'get',
    params: parameter
  })
}

export function getStateRoomListByStateId (parameter) {
  return axios({
    url: '/busRealEstate/getStateRoomListByStateId/' + parameter,
    method: 'get'
  })
}

/**
 * 添加房产
 *
 * @author anti
 * @date 2021-04-12 19:05:27
 */
export function busRealEstateAdd (parameter) {
  return axios({
    url: '/busRealEstate/add',
    method: 'post',
    data: parameter
  })
}

/**
 * 编辑房产
 *
 * @author anti
 * @date 2021-04-12 19:05:27
 */
export function busRealEstateEdit (parameter) {
  return axios({
    url: '/busRealEstate/edit',
    method: 'post',
    data: parameter
  })
}

/**
 * 删除房产
 *
 * @author anti
 * @date 2021-04-12 19:05:27
 */
export function busRealEstateDelete (parameter) {
  return axios({
    url: '/busRealEstate/delete',
    method: 'post',
    data: parameter
  })
}

export function getHxList (parameter) {
  return axios({
    url: '/basicInformation/list',
    method: 'get',
    params: parameter
  })
}

export function getFssList (parameter) {
  return axios({
    url: '/busRealEstate/fsslist',
    method: 'get',
    params: parameter
  })
}

export function detailByType (parameter) {
  return axios({
    url: '/busRealEstate/detailByType',
    method: 'get',
    params: parameter
  })
}

export function getRoomListByEstateIdOnOwnerType (parameter) {
  return axios({
    url: '/busRoom/getRoomListByEstateIdOnOwnerType',
    method: 'get',
    params: parameter
  })
}

export function getAllStateList () {
  return axios({
    url: '/busRealEstate/getAllStateList',
    method: 'get'
  })
}

export function exportExcel (parameter) {
  return axios({
    url: '/busRealEstate/exportExcel',
    method: 'post',
    data: parameter,
    responseType: 'blob'
  })
}
